package BHeap;

/**
 * The interface of a binomial heap tree (BHT).
 */
public interface BHT<T extends Comparable<T>> {

	/**
	 * creates and return a new heap containing no elements
	 */

	void make_heap();

	/**
	 * insert node x, whose key field has already been filled in, into heap
	 * 
	 */
	void insert(T data);

	/**
	 * returns the node head
	 */
	BHNode<T> getHead();

	/**
	 * set the node head
	 */
	public void setHead(BHNode<T> newHead);

	/**
	 * returns a pointer to the node in heap whose key is minimum
	 * 
	 */
	BHNode<T> minimum();

	/**
	 * deletes the node from heap whose key is minimum
	 */
	void extract_mim();

	/**
	 * creates and return a new heap that contains all the nodes of heaps "heap"
	 * and "current", heap and current are "destroyed" by this operation
	 * 
	 */
	void union(BHT<T> heap);

	/**
	 * assigns to node with xElemente within heap the new key value kElement
	 * which is assumed to be no greater than its current key value
	 * 
	 */
	void decrease_key(T xElement, T kElement);

	/**
	 * delete element from heap
	 * 
	 */
	void delete(T element, T menorValor);

	/**
	 * produce makes node y the new head of the linked list of node z's children
	 * in o(1).
	 * 
	 */
	void binomial_link(BHNode<T> child, BHNode<T> parent);

	void merge_binomial_heap(BHT<T> heap);

	BHNode<T> search(T element);

}
